package com.itheima.chapter01.circle;

import java.util.Random;
import java.util.Scanner;

public class demoRandom {
    public static void main(String[] args) {
        Random r= new Random();
        int i=r.nextInt(100);
        Scanner sc = new Scanner(System.in);
        while(true){
            System.out.println("请输入您要猜测的数据：");
            int in =sc.nextInt();
            if(in>i){
                System.out.println("你猜大了");
            }else if(in<i){
                System.out.println("你猜小了");
            }else{
                System.out.println("你猜对了");
                break;
            }

        }

    }

}
